package com.jcsz.gulimall.cart.vo;

import java.math.BigDecimal;
import java.util.List;

/**
 * @className: CartItem
 * @author: 一把Po吉他
 * @date: 2022/11/10 10:22
 * @version: 1.0
 **/
public class CartItem {
    //商品skuid
    private Long skuId;
    //商品是否被选中
    private Boolean checked = true;
    //商品标题
    private String title;
    //tupian
    private String image;


    //商品属性
    private List<String> skuAttr;
    //商品单价
    private BigDecimal price;
    //商品数量
    private Integer count;
    //总价
    private BigDecimal totalPrice;


    public Long getSkuId() {
        return skuId;
    }

    public void setSkuId(Long skuId) {
        this.skuId = skuId;
    }

    public Boolean getChecked() {
        return checked;
    }

    public void setChecked(Boolean checked) {
        this.checked = checked;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public List<String> getSkuAttr() {
        return skuAttr;
    }

    public void setSkuAttr(List<String> skuAttr) {
        this.skuAttr = skuAttr;
    }

    public BigDecimal getPrice() {
        return price;
    }

    public void setPrice(BigDecimal price) {
        this.price = price;
    }

    public Integer getCount() {
        return count;
    }

    public void setCount(Integer count) {
        this.count = count;
    }

    public BigDecimal getTotalPrice() {

        return this.price.multiply(new BigDecimal(this.count));
    }

    public String getImage() {
        return image;
    }

    public void setImage(String image) {
        this.image = image;
    }

}
